<? //CUSTOMERS_add.php;
$msg="";
include("CUSTOMERS_session.php");
if(isset($_POST["submit"]))
{
	$data_class = new CUSTOMERS();$data_class->setCustomerID($_POST["CustomerID"]);
	$data_class->setFirstName($_POST["FirstName"]);
	$data_class->setLastName($_POST["LastName"]);
	$data_class->setClass($_POST["Class"]);
	$data_class->setRoom($_POST["Room"]);
	$data_class->setBuilding($_POST["Building"]);
	$data_class->setAddress1($_POST["Address1"]);
	$data_class->setAddress2($_POST["Address2"]);
	$data_class->setCity($_POST["City"]);
	$data_class->setState($_POST["State"]);
	$data_class->setPostalCode($_POST["PostalCode"]);
	$data_class->setCountry($_POST["Country"]);
	$data_class->setPhone($_POST["Phone"]);
	$data_class->setEmail($_POST["Email"]);
	$data_class->setVoiceMail($_POST["VoiceMail"]);
	$data_class->setPasswords($_POST["Passwords"]);
	$data_class->setCreditCard($_POST["CreditCard"]);
	$data_class->setCreditCardTypeID($_POST["CreditCardTypeID"]);
	$data_class->setCardExpMo($_POST["CardExpMo"]);
	$data_class->setCardExpYr($_POST["CardExpYr"]);
	$data_class->setBillingAddress($_POST["BillingAddress"]);
	$data_class->setBillingCity($_POST["BillingCity"]);
	$data_class->setBillingRegion($_POST["BillingRegion"]);
	$data_class->setBillingPostalCode($_POST["BillingPostalCode"]);
	$data_class->setBillingCountry($_POST["BillingCountry"]);
	$data_class->setShipAddress($_POST["ShipAddress"]);
	$data_class->setSHipCity($_POST["SHipCity"]);
	$data_class->setShipRegion($_POST["ShipRegion"]);
	$data_class->setShipPostalCode($_POST["ShipPostalCode"]);
	$data_class->setShipCountry($_POST["ShipCountry"]);
	$data_class->setDateEntered($_POST["DateEntered"]);
	$insert_class = new SessionCUSTOMERS();
	$insert_class->insert($data_class);
	$msg = "Success Insert Data";
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Insert Data To Table CUSTOMERS</title>
<script src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery_validate.js"></script>
  <script>
  $(document).ready(function(){
    $("#form").validate();
  });
  </script>
</head>

<body>
<h2><?=$msg;?></h2><form name="form1" id="form" method="post" action="<?=$_SERVER["PHP_SELF"];?>">
  <table width="657" border="1">
    <tr>
      <td colspan="3">INSERT DATA</td>
    </tr><tr>
      <td width="97">CustomerID</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="CustomerID" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">FirstName</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="FirstName" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">LastName</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="LastName" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">Class</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="Class" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">Room</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="Room" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">Building</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="Building" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">Address1</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="Address1" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">Address2</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="Address2" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">City</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="City" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">State</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="State" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">PostalCode</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="PostalCode" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">Country</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="Country" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">Phone</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="Phone" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">Email</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="Email" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">VoiceMail</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="VoiceMail" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">Passwords</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="Passwords" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">CreditCard</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="CreditCard" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">CreditCardTypeID</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="CreditCardTypeID" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">CardExpMo</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="CardExpMo" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">CardExpYr</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="CardExpYr" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">BillingAddress</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="BillingAddress" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">BillingCity</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="BillingCity" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">BillingRegion</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="BillingRegion" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">BillingPostalCode</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="BillingPostalCode" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">BillingCountry</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="BillingCountry" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">ShipAddress</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="ShipAddress" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">SHipCity</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="SHipCity" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">ShipRegion</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="ShipRegion" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">ShipPostalCode</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="ShipPostalCode" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">ShipCountry</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="ShipCountry" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr><tr>
      <td width="97">DateEntered</td>
      <td width="3">:</td>
      <td width="535"><input type="text" name="DateEntered" value="" class="required " minlength="0" maxlength="25" /></td>
    </tr> <tr>
      <td></td>
      <td></td>
      <td><input type="submit" name="submit" value="Add" /></td>
    </tr>
   
  </table>
</form>
</body>
</html>